/**
 * @file chassis.h
 * @author vaine
 * @brief 控制麦轮底盘驱动板
 * @version 0.1
 * @date 2021-07-04
 * 
 * @copyright Copyright (c) 2021
 * 
 */

#include <stdint.h>

#ifndef __CHASSIS_H
#define __CHASSIS_H

#define CHASSIS_HEAD 0x7768
#define CHASSIS_ID   1
#define CHASSIS_END  0xFFFF
typedef struct __CHASSIS_PROTOCAL{
    uint16_t head;
    uint8_t  len;
    uint8_t  board_id;
    uint8_t  motor_id;
    uint8_t  run_mode;
    int8_t   speed_set;
    uint8_t  sign_speed;
    uint16_t check_sum;
}CHASSIS_PROTOCAL;

// void Chassis_Init();
void STOP();
void Move_FB(int8_t speed);
void Move_CW(int8_t speed);
void Move_LF(int8_t speed);
void Turn_FL(int8_t radius, int8_t vel);
void set_speed_25ga(uint8_t id, int8_t speed);

#endif
